<#include "/common/defaultEngine.html"/>
<@pageTheme mark="${config.optimize()?string('true', 'false')}">
<@header title="ERP人事账户更新列表" bodyClass="gray-bg animated fadeInRight" isAnimation="false" libs=["table","zTree","layout-latest"]/>
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <@form.form id="accountupdate-form" class="form-inline">
            <div class="select-list">
                <ul>
                    <li>
                        <label> <@ctx.i18n text = "流水号"/>：
                            <input type="text" name="serialNumber"/> </label>
                    </li>
                    <li>
                        <label> <@ctx.i18n text = "申请人名称"/>：
                            <input type="text" name="applyUsername"/> </label>
                    </li>
                    <li>
                        <label> <@ctx.i18n text = "账户类型"/>： </label>
                        <select name="accountType" class="form-control">
                            <option value=""><@ctx.i18n text = "所有"/></option>
                            <#list dict.getType('sys_erp_select_account')>
                            <#items as d>
                            <#if d.status =='0' >
                            <option value="${d.dictValue}" text="${d.dictLabel}"><@ctx.i18n text = "${d.dictLabel}"/></option>
                        </#if>
                    </#items>
                </#list>
                </select>
                </li>
                <li>
                    <label> <@ctx.i18n text = "受益人名称"/>：
                        <input type="text" name="beneficiaryUsername"/> </label>
                </li>
                <li>
                    <label> <@ctx.i18n text = "薪资类型"/>： </label>
                    <select name="salaryType" class="form-control">
                        <option value=""><@ctx.i18n text = "所有"/></option>
                        <#list dict.getType('sys_erp_salary_type')>
                        <#items as d>
                        <#if d.status =='0' >
                        <option value="${d.dictValue}" text="${d.dictLabel}"><@ctx.i18n text = "${d.dictLabel}"/></option>
                    </#if>
                </#items>
            </#list>
            </select>
            </li>
            <li>
                <label> <@ctx.i18n text = "金额"/>：
                    <input type="text" name="salaryMoney"/> </label>
            </li>
            <li>
                <label> <@ctx.i18n text = "会计人员"/>：
                    <input type="text" name="accountingPerson"/> </label>
            </li>
            <li class="select-time">
                <label> <@ctx.i18n text = "会计通过时间"/>： </label>
                <input type="text" class="time-input" name="AccountingCrossTime"/>
            </li>
        <li>
            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;&nbsp;<@ctx.i18n text = "查询"/></a>
            <a class="btn btn-warning btn-rounded btn-sm" onclick="opt.form.reset()"><i class="fa fa-refresh"></i>&nbsp;<@ctx.i18n text = "重置"/></a>
        </li>
        </ul>
    </div>
</@form.form>
</div>
<@table id="bootstrap-table">
<@shiro.hasPermission name="erp:accountupdate:add">
<a class="btn btn-success" onclick="opt.operate.add()"><i class="fa fa-plus"></i>&nbsp;<@ctx.i18n text = "新增"/></a>
</@shiro.hasPermission>
<@shiro.hasPermission name="erp:accountupdate:edit">
<a class="btn btn-primary single disabled" onclick="opt.operate.edit()"><i class="fa fa-pencil-square-o"></i>&nbsp;<@ctx.i18n text = "修改"/></a>
</@shiro.hasPermission>
<@shiro.hasPermission name="erp:accountupdate:del">
<a class="btn btn-danger multiple disabled" onclick="opt.operate.delAll()">
    <i class="fa fa-remove"></i> <@ctx.i18n text = "删除"/>
</a>
</@shiro.hasPermission>
</@table>
<div>
</div>
<@footer>
<script>
    var editFlag = "${permission.hasPermi("erp:accountupdate:edit")}";
    var listFlag = "${permission.hasPermi("erp:accountupdate:add")}";
    var delFlag = "${permission.hasPermi("erp:accountupdate:del")}";
    var visible = ${permission.isPermitteds("erp:accountupdate:edit,erp:accountupdate:del,erp:accountupdate:add")?string('true', 'false')};
    var accountTypeDatas = ${dict.getDictListJson('sys_erp_select_account')};
    var salaryTypeDatas = ${dict.getDictListJson('sys_erp_salary_type')};
    var managerApprovalDatas = ${dict.getDictListJson('sys_crm_isOrNo')};
    var accountingApprovalDatas = ${dict.getDictListJson('sys_crm_isOrNo')};
    var prefix = baseURL + "erp/accountupdate";

    $(function() {
        var options = {
            url: prefix + "/list",
            addUrl: prefix + "/add",
            editUrl: prefix + "/edit/{id}",
            delUrl: prefix + "/del",
            modalName: "ERP人事账户更新",
            uniqueId:    'id'/* 唯一ID */                                                         ,
            escape: true,            /* 分页设置 */
            showPageGo: true,       /* 分页设置 */
            pageSize: 10,            /* 分页设置 */
            pageList: [10, 30, 50], /* 分页设置 */
            columns: [
                {title: $.i18n.prop("序号"), width: 5, align: "center", formatter: function (value, row, index) {
                        return $.table.serialNumber(index);
                    }}
                ,{field : 'id',title : '<@ctx.i18n text = "主键"/>',visible: false}
                ,{field : 'serialNumber',title : '<@ctx.i18n text = "流水号"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
                ,{field : 'applyUsername',title : '<@ctx.i18n text = "申请人名称"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
                ,{field : 'accountType',title : '<@ctx.i18n text = "账户类型"/>',formatter: function(value, row, index) { return $.table.selectDictLabels(accountTypeDatas, value); }}
                ,{field : 'beneficiaryUsername',title : '<@ctx.i18n text = "受益人名称"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
                ,{field : 'salaryType',title : '<@ctx.i18n text = "薪资类型"/>',formatter: function(value, row, index) { return $.table.selectDictLabels(salaryTypeDatas, value); }}
                ,{field : 'salaryMoney',title : '<@ctx.i18n text = "金额"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
                ,{field : 'accountingPerson',title : '<@ctx.i18n text = "会计人员"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
                ,{field : 'accountingCrossTime',title : '<@ctx.i18n text = "会计通过时间"/>', align: 'center', formatter: function(value, row, index) {return $.table.tooltip(value,10);}}
                ,{title:"<@ctx.i18n text = '操作'/>",align: 'center',visible:visible,formatter: function(value, row, index) {
                        var actions = [];
                        // actions.push('<a class="btn btn-danger btn-xs ' + delFlag + '" href="javascript:void(0)" onclick="opt.operate.del(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
                        actions.push('<a class="btn btn-danger btn-xs ' + delFlag + '" href="javascript:void(0)" onclick="showDetail(\'' + row.id + '\')"><i class="fa fa-remove"></i>查看</a>');
                        return actions.join('');
                    }
                }

            ]
        };
        $.table.init(options);
    });
    function showDetail(id){
        opt.modal.open("查看",prefix+"/view3/"+id);
    }
</script>
</@footer>
</@pageTheme>